package org.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;
import org.example.dto.DailyUserResponseDTO;
import org.example.dto.UserVO;
import org.example.entity.Users;
import org.example.dto.UserStatisticsDTO;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

/**
 * @author ljh
 * @version 1.0
 * @Description
 * @date 2025/7/21 15:01
 */
@Service
public interface UsersService extends IService<Users> {
    //查询全部
    List<Users> getAllUsers();
    
    //根据openid查询用户
    Users getUserByOpenid(String openid);
    
    //保存或更新用户信息
    Users saveOrUpdateUser(String openid, String unionid, String nickname, String avatar);
    
    //更新用户信息
    String updateUserInfo(Users users);
    //日/月活总数
    UserStatisticsDTO getUserStatistics();

    //查询当日活跃用户列表
    List<UserVO> getDailyActiveUsers(LocalDate date);
    //查询当日活跃用户数
    int getDailyActiveUserCount(LocalDate date);
}
